/*
 * @Description: 
 * @Author: chaixinyu
 * @Date: 2022-12-24 15:47:13
 * @LastEditors: 47
 * @LastEditTime: 2023-02-11 15:15:44
 */
// 课程模块路由
export default [
    // 重定向，在项目刚开始跑的时候，访问 / | * ，让他立马定向到首页
    // {
    //     path: '/',
    //     redirect: '/home'
    // },
    // 我的课程 mycourse
    {
        path: '/mycourse',
        name: 'mycourse',
        component: () =>
            import ('@/views/MyCourse/index.vue')
    },
    // 课程信息 courseinfo
    {
        path: '/courseinfo',
        name: 'courseinfo',
        component: () =>
            import ('@/views/CourseInfo/index.vue'),
        children: [
            // 重定向
            {
                path: '/courseinfo',
                redirect: '/courseinfo/coursesection'
            }, {
                path: 'coursetask',
                name: 'coursetask',
                component: () =>
                    import ('@/views/CourseInfo/CourseTask/index.vue')
            }, {
                path: 'coursesection',
                name: 'coursesection',
                component: () =>
                    import ('@/views/CourseInfo/CourseSection/index.vue')
            },
            {
                path: 'coursemore',
                path: 'coursemore',
                component: () =>
                    import ('@/views/CourseInfo/CourseMore/index.vue')
            },
        ]

    },
    // 本章任务 thischapter
    {
        path: '/thischapter',
        name: 'thischapter',
        component: () =>
            import ('@/views/ThisChapter/index.vue')
    },
    // 所有考试 allexam
    {
        path: '/allexam',
        name: 'allexam',
        component: () =>
            import ('@/views/AllExam/index.vue')
    },
    // 学习记录 studyrecord
    {
        path: '/studyrecord',
        name: 'studyrecord',
        component: () =>
            import ('@/views/StudyRecord/index.vue')
    },
    // 课程讨论 coursediscussion
    {
        path: '/coursediscussion',
        name: 'coursediscussion',
        component: () =>
            import ('@/views/CourseDiscussion/index.vue')
    },
    // 开始考试 startexam
    {
        path: '/startexam/:testId?',
        name: 'startexam',
        component: () =>
            import ('@/views/StartExam/index.vue')
    },
    // 课程签到 coursesign
    {
        path: '/coursesign/:signId?/:signStatus?',
        name: 'coursesign',
        component: () =>
            import ('@/views/CourseSign/index.vue')
    },
    // 交卷成功 examsuccess
    {
        path: '/examsuccess/:testId?',
        name: 'examsuccess',
        component: () =>
            import ('@/views/ExamSuccess/index.vue')
    },
    // 作业考试 homeworktest
    {
        path: '/homeworktest',
        name: 'homeworktest',
        component: () =>
            import ('@/views/HomeworkTest/index.vue'),
        children: [
            // 重定向
            {
                path: '/homeworktest',
                redirect: '/homeworktest/homework'
            }, {
                path: 'homework',
                component: () =>
                    import ('@/views/HomeworkTest/Homework/index.vue')
            }, {
                path: 'test',
                component: () =>
                    import ('@/views/HomeworkTest/Test/index.vue')
            }
        ]

    },
    // 课程通知详情页 coursenotice
    {
        path: '/coursenotice',
        name: 'coursenotice',
        component: () =>
            import ('@/views/CourseNotice/index.vue')
    },
    // 讨论回复 discussionreply
    {
        path: '/discussionreply/:discussId?',
        name: 'discussionreply',
        component: () =>
            import ('@/views/DiscussionReply/index.vue')
    },
    // 自选课程 morecourse
    {
        path: '/morecourse',
        name: 'morecourse',
        component: () =>
            import ('@/views/MoreCourse/index.vue')
    },
    // 考试答题 examing
    {
        path: '/examing/:testId?',
        name: 'examing',
        component: () =>
            import ('@/views/ExamIng/index.vue')
    },
    // 作业答题 homeworking
    {
        path: '/homeworking/:homeworkId?',
        name: 'homeworking',
        component: () =>
            import ('@/views/HomeworkIng/index.vue')
    },
    // 作业提交成功 homeworksuccess
    {
        path: '/homeworksuccess',
        name: 'homeworksuccess',
        component: () =>
            import ('@/views/HomeworkSuccess/index.vue')
    },
    // 地图 mapcontainer
    {
        path: '/MapContainer/:discussId?/:noticeId?',
        name: 'mapcontainer',
        component: () =>
            import ('@/views/MapContainer/index.vue')
    },
]